import axios from "axios";

export function saveOrUpdateConfig(data: any) {
    return axios.post("/sys/config/saveOrUpdate", data);
}

export function deleteConfigById(params: any) {
    return axios.delete("/sys/config/delete/id", {
        params: params
    });
}

export function exportConfigFile(data: any) {
    return axios.post("/sys/config/export", data, {
        responseType: 'blob'
    });
}

export function importConfigFile(data: any) {
    return axios.post("/sys/config/import", data, {
        headers: {'content-type': 'application/x-www-form-urlencoded'},
    });
}

export function getPageConfig(params: any) {
    return axios.get("/sys/config/list/page", {
        params: params
    });
}

